"use strict";
cc._RF.push(module, '8fd4doB4jlNu4QzpWSRKbDV', 'Finish');
// script/Finish.js

"use strict";

/**
 * 人物到达终点
 */
cc.Class({
    extends: cc.Component,

    properties: {},

    onLoad: function onLoad() {},


    onBeginContact: function onBeginContact(contact, selfCollider, otherCollider) {
        //将人物的线速度改为0，播放自身动画和人物动画
        var velocity = otherCollider.node.getComponent(cc.RigidBody)._b2Body.m_linearVelocity;
        velocity.x = 0;
        velocity.y = 0;
        otherCollider.node.prop = "Finished";
        selfCollider.node.getComponent(cc.Animation).play("finish");
        otherCollider.node.getComponent(cc.Animation).play("takeGuitar");
    },

    start: function start() {}
}

// update (dt) {},
);

cc._RF.pop();